<template>
  <div id="BusinessRecords">
    <div class="content" v-if="contentData.length>0">
      <ul>
        <li v-for="(item, index) in contentData" :key="index" @click="handleGo(item)">
          <p style="margin-bottom: 4px; line-height: 18px">
            <span class="hz">户主姓名：{{ item.HOUSEAPPLICANT }}</span>
            <span style="float: right">联系电话：{{ item.APPLYPHONE }}</span>
          </p>
          <p style="margin-bottom: 4px">
            <span>地址：{{ item.CONSTRUCITONADDRESS ? item.CONSTRUCITONADDRESS : '暂无数据' }}</span>
          </p>
          <p style="margin-bottom: 4px">
            <span style="float: left">当前进展：{{ item.NODE_NAME }}</span>
            <!--            <span>签订时间：{{item.APPLYTIME}}</span>-->
            <span style="float: right">项目状态：{{ item.HTQDZT == 1|| (item.NODE_NAME=='现场放样'||item.NODE_NAME=='基槽沿线'||item.NODE_NAME=='竣工验收'||item.NODE_NAME=='一层立模') ? '已签订' : '未签订' }}</span>
          </p>
          <p></p>
        </li>
      </ul>
    </div>
    <div v-if="contentData.length== 0 " style="height: 60vh; text-align: center; padding-top: 20vh">
      <div style="margin-bottom: 10px">
        <img src="https://nfzjszlb.jst.zj.gov.cn/serverfile/zheliban/icon/DSF/50.png" />
      </div>
      <div>暂无数据</div>
    </div>
  </div>
</template>
<script>
import { QuerySignCallback } from '@/utils/api'
export default {
  data() {
    return {
      ISshow: true,
      contentData: [],
    }
  },
  watch: {},
  methods: {
    getData: async function () {
      this.contentData = []
      let params = {
        dataguid: '108e32b8-0dde-40aa-a23c-3e1ec8702c05',
        searchObject: JSON.stringify([]),
      }
      let params1 = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: params,
      }
      const res = await QuerySignCallback(params1)
      this.contentData = eval('(' + res.data.data + ')').Data
      params.dataguid = '25492f43-4fa8-4176-b3dd-e6cfe6407fc5'
      const res1 = await QuerySignCallback(params1)
      eval('(' + res1.data.data + ')').Data.forEach(item=>{
        this.contentData.push(item)
      })
      //  params.dataguid = 'baff7849-f192-4f1f-8ff6-210eefb92a85'
      // const res2 = await QuerySignCallback(params1)
      // this.contentData.push(eval('(' + res2.data.data + ')').Data)
    },
    handleGo(data){
       if(data.HTQDZT == 1){
        this.$toast.fail("已完成合同签订")
       }
    }
  },
  mounted() {
    this.getData()
  },
}
</script>
<style lang="scss">
#BusinessRecords {
  height: 100vh;
  overflow: auto;
  background: #fff;
  .top {
    height: 90px;
    background: #ffffff;
    margin-bottom: 20px;
    padding-top: 25px;
    text-align: center;
    .origin {
      width: 22px;
      height: 22px;
      background: #007aff;
      border-radius: 50%;
      display: inline-block;
    }
    .line {
      width: 20vw;
      /*height: 1px;*/
      border: 1px dashed #007aff;
      display: inline-block;
    }
  }
  .content {
    height: 100vh;
    overflow: auto;
    padding: 10px;
    font-size: 14px;
    ul li {
      height: auto;
      margin-bottom: 10px;
      padding: 10px 0;
      background: #fff;
      color: #848484;
      border-bottom: 1px solid #d2d2d2;
      .hz {
        color: #000;
        font-size: 16px;
      }
      p {
        clear: both;
        overflow: hidden;
      }
    }
  }
}
</style>
